User talk:Cqm
Thanks Thank you for the code formatting, and to answer the question... I have no idea how it worked but it just did. User:Shining-Armor :No problem. All I really did was run it through jshint and fixed the errors that came up there. :Whenever I run code through Jslint it gives me errors that do not make sense. like saying $ in $.get is defined before use. User:Shining-Armor ::It's because the jQuery object, $, isn't standard javascript. jQuery is a (popular, high use) library that is ported with MediaWiki. There's a checkbox below the code input area labelled something like "Assume jQuery" that'll fix that. You can just ignore those errors if you want through. It'll do the same for every use of the mw (mediaWiki) object too. It's more convenient to add the options directly to your JS code as comments. This e.g. will tell jshint to treat jQuery, $ and mediaWiki as globals: /*jshint jquery:true*/ /*global mediaWiki:true*/ Check the jshint documentation! There are a lot more options. This is the prologue that I copypaste into every new file: /*jshint jquery:true, browser:true, devel:true, camelcase:true, curly:false, undef:true, bitwise:true, eqeqeq:true, forin:true, immed:true, latedef:true, newcap:true, noarg:true, unused:true, regexp:true, strict:true, trailing:false */ /*global mediaWiki:true*/ The mediaWiki makers recommend jshint too btw. Though their recommended procedure is a little too complicated for most needs. -- Closures Can you please attempt to explain to me what diff=12718&oldid=12661}} this does -- why it's necessary to pass global variables into an IIFE? And what's the beginning semicolon for? That's not even in the recommendations and I don't think it looks good. ~Bobogoobo (talk) 05:52, June 22, 2013 (UTC) :I figured that was what the semicolon was for -- an idiocy shield. If something's broken it should be fixed anyway. I guess it's harmless and useful, but then why doesn't every script do it (that's the first time I've seen it) and why isn't it in the coding conventions? As for the closures, obviously $ and mw are undefined in jshint since it's not a page that the script is meant to run on, which always have those defined. The rest is unnecessary because what the heck else on a Wikia page would use those? If Wikia even wanted to use something that would override those, I'm sure they would prevent it, so that they didn't break every single thing that already uses it. But again, harmless and good practice I guess, so...anyway, thanks for the explanations. ~Bobogoobo (talk) 08:22, June 22, 2013 (UTC) Welcome Hi, welcome to ! Thanks for your edit to the User talk:Pecoes page. Please leave a message on my talk page if I can help with anything! Grunny (talk) 09:44, July 22, 2013 (UTC) Source Tag The source tag is deprecated? Since when? Where does it say that? -- :On the extension documentation itself: mw:Extension:SyntaxHighlight GeSHi. It's not obvious, still reports on source tags rather than syntaxhighlight and source tags still work (for backwards compatibility perhaps?). Nonetheless, the extension docs say to use syntaxhighlight as seen in the tags used section of the infobox. ::Ah. I see. You mean this: ::"Before rev:50696, the extension used the tag . This is still supported, but avoids conflicts if your source code itself contains (for example XML)." ::It doesn't say "deprecated" though. It only says that has less conflict potential. -- :::Considering the general lack of mention of them I'm inclined to remove them incase they become unsupported at some point in the future. ::::I think you're overinterpreting the word "still" :) -- Creating a new discussion for ajaxRC I'd submit your changes to AjaxRC at Portal:Code review so it can hopefully be pushed to AjaxRC/code.js by new week. --[[User:Kangaroopower|'Kangaroopowah']] ([[User Talk:Kangaroopower|'Talk']]) 18:55, August 1, 2013 (UTC) :Cheers, will do. Code Sorry to waist your time, but where did you learn code — [[User:Original Authority|'Original']]Authority at Wikia Developers Wiki 17:21, August 10, 2013 (UTC) :I started out with a bit of codeacademy to teach me the basics. I got to the point where I wasn't learning anything particularly useful to me, so started reading through the various scripts on my home wiki. From there I picked a project and learned what I had to make it all work, largely through googling my problem which usually led me to stackoverflow (a truly fantastic resource). I think my earliest fully fledged script was w:c:rs:User:Cqm/adminreport.js. It sstarted out as querying the mediawiki api for the number of wanted files/page/templates/categories, broken and double redirects and unused files. From there I added a way to detect if there were pages in certain categories (page for deletion for example) and then when certain pages were last edited. :Just pick something you want to do, then figure out how to do it. It doesn't need to be an elegant script, as long as it works it serves as a learning exercise. I used HeaderLinks/code.js as an exercise in native js, as I'd largely been using jQuery up until then. If I got stuck I'd just google my problem until I found an answer. :PS. The favicon image in your sig doesn't work. ::Thanks, I'm actually using codecademy, I've been doing it for a while, I've run into the same problem as you, nothing useful. The sig problem is due to there being no favicon for this wiki, there using an alternative file. — [[User:Original Authority|'Original']]Authority at Wikia Developers Wiki 18:22, August 10, 2013 (UTC) Chat help Yes well can you come to my wiki Chat i have few quesionsJarjarkine (talk) 00:20, November 22, 2013 (UTC) Wait you cant edit the wiki cuz youy are not admin..Jarjarkine (talk) 00:23, November 22, 2013 (UTC) The next iteration for ajaxrc Hey cam. So this is what I was thinking we could do for the next version of ajaxrc. First, expose the script under either the dev.ajaxrc global or just the global AjaxRC. Secondly, make a way to change ajaxrc configuration through object notation, not individual global variables, while maintaining backwards compatibility with the old version. Finally, I want to see what I can do about submitting a pulls request so we don't need to have a recentchangeslocal variable in the script. Does that sound good to you? I'll probably have the first two done by the end of the first week in January. Best, --[[User:Kangaroopower|'Kangaroopowah']] ([[User Talk:Kangaroopower|'Talk']]) 16:29, December 26, 2013 (UTC) :The global thing seems like the next step in the development of the script. I'd stick with keeping it under the dev global for consistency's sake, perhaps combine it with a version/timestamp to make sure we're using the version imported from dev (if for some reason we can't find the import). As for the config, what about using dev.ajaxrc for the config then extending it using $.extend in the main script. :For the pull request, it could take an extraordinarily long time. github:Wikia/app/pull/1470 has been open 4 months with negligible progress. That's assuming we can even convince wikia to class it as something that requires a fix. I assume you know it needs to enter wikia's bug tracker before a pull request can be opened, let me know if you want any help writing a s:c to argue your case. ::Two things. Firstly, don't worry about the pull request. Secondly, the way you exposed ajaxrc in cqm/ajaxrc.js is the more verbose (and honestly, a bit more complicated) of the way to do it. The way im planning to do it is to create an nd variable in the closure header as dev.ajaxrc and then initialize it at the bottom of the script with all the methods there in object literal form. --[[User:Kangaroopower|'Kangaroopowah']] ([[User Talk:Kangaroopower|'Talk']]) 03:33, December 28, 2013 (UTC) ::Ok so I finished my version of the new config and global object. They're over at /beta.js. The disadvantage to the way I handled the globalness is that it doesn't have "write" capabilities, that is to say modifiying the object's functions from console won't actually change the way the script performs. If we were to change it we would use the way you started coding it in your userspace. You should not however that this is an important design descicion for the script that should be thought about fairly carefully. Lastly about the config, our implementations user-side wise are the same but yours way buggy if dev.ajaxrc existed but only had some config options but not all so I fixed that. Best, [[User:Kangaroopower|'Kangaroopowah']] ([[User Talk:Kangaroopower|'Talk']]) 03:25, December 29, 2013 (UTC)